<?php
/* @var $this AchievementController */
/* @var $model Achievement */

$this->breadcrumbs=array(
	'成果展示管理',
);

$this->menu=array(
	array('label'=>'返回后台主页', 'url'=>array('default/index')),
	array('label'=>'创建新成果', 'url'=>array('create')),
);
?>

<h1>成果展示管理</h1>

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'achievement-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
        array(
            'name'=>'id',
            'value'=>'$data->id',
            'htmlOptions'=>array('style'=>'width:100px')
        ),
		'title',
        array(
            'name'=>'user_id',
            'type'=>'raw',
			'value'=>'CHtml::link($data->user_id,array("user/view","id"=>$data->user_id))',
            'htmlOptions'=>array('style'=>'width:100px')
        ),
        array(
            'name'=>'type_id',
            'value'=>'$data->type->title',
            'filter'=>$model->getTypeOptions(),
            'htmlOptions'=>array('style'=>'width:100px')
        ),
        array(
            'name'=>'views',
            'value'=>'$data->views',
            'htmlOptions'=>array('style'=>'width:100px')
        ),
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
